home *** CD-ROM | disk | FTP | other *** search
/ Champak 123 / (Vol 123) Jan 13 2011.iso / Games / plumber_2.swf / scripts / frame_45 / DoAction_2.as next >
Text File  |  2011-01-13  |  1KB  |  68 lines

  1. function displaypipes()
  2. {
  3.    i = 1;
  4.    while(i < 78)
  5.    {
  6.       st = holder[i - 1];
  7.       if(st > 0)
  8.       {
  9.          attachMovie("pipeshell","pipe" + num,100 + num);
  10.          with(eval("pipe" + num))
  11.          {
  12.             pipe.gotoAndStop(st);
  13.             pipe.typeofpipe = st;
  14.             down = math.floor(num / 11);
  15.             across = num - down * 11;
  16.             _x = 59 + across * 60;
  17.             _y = 105 + down * 60;
  18.             pipe.n = num;
  19.             w = across;
  20.             v = down;
  21.          }
  22.       }
  23.       num++;
  24.       i++;
  25.    }
  26. }
  27. function wait()
  28. {
  29.    if(go == 1)
  30.    {
  31.       gotoAndPlay(45);
  32.    }
  33. }
  34. function mainmenu()
  35. {
  36.    clear();
  37.    removeMovieClip("gf");
  38.    gotoAndPlay(29);
  39. }
  40. if(music == 0)
  41. {
  42.    musicclip.gotoAndStop(2);
  43. }
  44. clear();
  45. score += bonus;
  46. if(level >= 99)
  47. {
  48.    gotoAndPlay(66);
  49. }
  50. use = 1;
  51. moves = 0;
  52. time = 0;
  53. num = 0;
  54. holder = new Array();
  55. holder = levels[level].split(",");
  56. displaypipes();
  57. attachMovie("levelintro","lv",1000);
  58. lv._x = 360;
  59. lv._y = 240;
  60. if(level > 25)
  61. {
  62.    trace(level);
  63.    attachMovie("gflast","gf",1000);
  64.    gf._x = 360;
  65.    gf._y = 240;
  66.    resetgame();
  67. }
  68.